


***********************************************
****** The Impact of Soft-Skills Training *****
******    for Entrepreneurs in Jamaica    *****
***********************************************


* This file cleans the data coming from the questionnaire for follow-up 1


clear all
cap log close
set more off

cap cd "$directory"



*******************
*** Follow-up 1 ***
*******************

*** Load data ***

* Load follow-up 1 data
use "$data_raw\fu1_data.dta"

* Destring respondent ID
destring D1, gen(respondent_id)
lab var respondent_id "Respondent ID"

* Drop duplicates
drop if inlist(SbjNum,49210231,49210229,48475347,49210233,48577871)

* Use variable name if no variable label available
foreach var of varlist * {
	if "`: var lab `var''"=="" lab var `var' "`var'"
}


*** Edit data ***

* Correct age
replace D_EXACTA=49 if respondent_id==20010
replace D_EXACTA=29 if respondent_id==20029
replace D_EXACTA=30 if respondent_id==20059
replace D_EXACTA=50 if respondent_id==20139
replace D_EXACTA=60 if respondent_id==20151
replace D_EXACTA=33 if respondent_id==20161
replace D_EXACTA=63 if respondent_id==20554
replace D_EXACTA=63 if respondent_id==20561
replace D_EXACTA=56 if respondent_id==20567
replace D_EXACTA=65 if respondent_id==20668
replace D_EXACTA=71 if respondent_id==20694
replace D_EXACTA=66 if respondent_id==20696
replace D_EXACTA=35 if respondent_id==20723
replace D_EXACTA=65 if respondent_id==20749
replace D_EXACTA=33 if respondent_id==20755
replace D_EXACTA=33 if respondent_id==20850
replace D_EXACTA=50 if respondent_id==20937

* Correct number of employees
replace B2A="0" if B2A=="none"
replace B2A="0" if B2A=="O"
replace B2A="4" if B2A=="40000"
replace B2A="8" if B2A=="88000"
replace B2A="0" if B2A==""
replace B2B="6" if B2B=="2-10"
replace B2B="3" if B2B=="2-4"
replace B2B="0" if B2B=="" & B2!=.

* Correct sales in the last month
replace B3A="1200000" if B3A=="1.20000000"
replace B3A="65000" if B3A=="65"
replace B3A="85000" if B3A=="70000.100000"
replace B3A="120000" if B3A=="120,000"
replace B3A="100000" if B3A=="over 100000"
replace B3A="10000" if B3A=="10,000"
replace B3A="10500" if B3A=="10,500"
replace B3A="100000" if B3A=="100,000"
replace B3A="110000" if B3A=="100000-120000"
replace B3A="12000" if B3A=="12,000"
replace B3A="13850" if B3A=="13,850"
replace B3A="140000" if B3A=="140,000"
replace B3A="15000" if B3A=="15,000"
replace B3A="17500" if B3A=="15-20000"
replace B3A="150000" if B3A=="150,000"
replace B3A="16000" if B3A=="16,000"
replace B3A="180000" if B3A=="180,000"
replace B3A="20000" if B3A=="20,000"
replace B3A="200000" if B3A=="200,000" | B3A=="200000 plus"
replace B3A="250000" if B3A=="200000-300000"
replace B3A="21000" if B3A=="21,000"
replace B3A="23000" if B3A=="23,000"
replace B3A="25000" if B3A=="25,000"
replace B3A="250000" if B3A=="250,000"
replace B3A="27500" if B3A=="25000-35000"
replace B3A="28000" if B3A=="28,000"
replace B3A="30000" if B3A=="30,000"
replace B3A="35000" if B3A=="35,000"
replace B3A="40000" if B3A=="40,000"
replace B3A="42500" if B3A=="40000-45000"
replace B3A="45000" if B3A=="45,000"
replace B3A="48000" if B3A=="48,000"
replace B3A="50000" if B3A=="50,000"
replace B3A="55000" if B3A=="55,000"
replace B3A="60000" if B3A=="60,000"
replace B3A="80000" if B3A=="80,000"
replace B3A="62500" if B3A=="60000-65000"
replace B3A="55000" if B3A=="50000-60000"
replace B3A="70000" if B3A=="60000-80000"
replace B3A="630000" if B3A=="630,000"
replace B3A="90000" if B3A=="80000-100000"
replace B3A="85000" if B3A=="70000-100000"
replace B3A="950000" if B3A=="950,000"
replace B3A="500000" if B3A=="500,0000"
replace B3A="750000" if B3A=="more than 500,0000 less than a million"
replace B3A="0" if B3A=="none" | B3A=="no"
replace B3A="" if strpos(B3A,"remember")>0 | strpos(B3A,"cant")>0 | strpos(B3A,"dont")>0
replace B3A="" if strpos(B3A,"sure")>0 | strpos(B3A,"refused")>0

* Correct sales in a typical month
replace B3B="1200000" if B3B=="1.20000000"
replace B3B="150000" if B3B=="100000-200000"
replace B3B="50000" if B3B=="50,000"
replace B3B="10500" if B3B=="10,500"
replace B3B="100000" if B3B=="100,000"
replace B3B="12000" if B3B=="12,000"
replace B3B="18000" if B3B=="18,000"
replace B3B="20000" if B3B=="20,000"
replace B3B="120000" if B3B=="120,000"
replace B3B="13000" if B3B=="13,000"
replace B3B="150000" if B3B=="150,000"
replace B3B="160000" if B3B=="160,000"
replace B3B="170000" if B3B=="170,000"
replace B3B="180000" if B3B=="180,000"
replace B3B="200000" if B3B=="200,000"
replace B3B="220000" if B3B=="220,000"
replace B3B="25000" if B3B=="25,000"
replace B3B="250000" if B3B=="250,000"
replace B3B="280000" if B3B=="280,000"
replace B3B="30000" if B3B=="30,000"
replace B3B="300000" if B3B=="300,000"
replace B3B="35000" if B3B=="35,000"
replace B3B="40000" if B3B=="40,000"
replace B3B="400000" if B3B=="400,000"
replace B3B="5000" if B3B=="5,000"
replace B3B="50000" if B3B=="50,000"
replace B3B="55000" if B3B=="60,000"
replace B3B="60000" if B3B=="55,000"
replace B3B="70000" if B3B=="70,000"
replace B3B="75000" if B3B=="75,000"
replace B3B="817000" if B3B=="817,000"
replace B3B="10000" if B3B=="10000 or less"
replace B3B="100000" if B3B=="100000 less or more"
replace B3B="100000" if B3B=="100000 or less"
replace B3B="100000" if B3B=="100000 or more"
replace B3B="15000" if B3B=="10000-20000"
replace B3B="125000" if B3B=="100000-150000"
replace B3B="152500" if B3B=="125000-180000"
replace B3B="125000" if B3B=="125000can be more or less"
replace B3B="180000" if B3B=="140000-20000"
replace B3B="15000" if B3B=="15000 or more"
replace B3B="16000" if B3B=="15000-17000 or nothing"
replace B3B="16500" if B3B=="15000-18000"
replace B3B="17500" if B3B=="15000-20000"
replace B3B="20000" if B3B=="15000-25000"
replace B3B="27500" if B3B=="15000-40000"
replace B3B="175000" if B3B=="150000-200000"
replace B3B="15000" if B3B=="15000up"
replace B3B="170000" if B3B=="170000 or less"
replace B3B="190000" if B3B=="180000-200000"
replace B3B="20000" if B3B=="20000 or less"
replace B3B="600000" if B3B=="200000- 1 million"
replace B3B="225000" if B3B=="200000-250000"
replace B3B="240000" if B3B=="240000 more or less"
replace B3B="25000" if B3B=="25000 more or less"
replace B3B="27500" if B3B=="25000-30000"
replace B3B="37500" if B3B=="25000-50000"
replace B3B="325000" if B3B=="250000-450000"
replace B3B="440000" if B3B=="250000-630000"
replace B3B="265000" if B3B=="260000-270000"
replace B3B="350000" if B3B=="3-4m"
replace B3B="30000" if B3B=="30000 more or less" | B3B=="30000 or more or less" 
replace B3B="45000" if B3B=="30000-60000"
replace B3B="300000" if B3B=="300000 or more"
replace B3B="350000" if B3B=="300000-400000"
replace B3B="675000" if B3B=="35000-100000"
replace B3B="12500" if B3B=="10000-15000"
replace B3B="4000" if B3B=="3000-5000"
replace B3B="37500" if B3B=="35000-40000"
replace B3B="6500000" if B3B=="4,000000-9,000000"
replace B3B="4000" if B3B=="4000 less or more"
replace B3B="9500" if B3B=="4000-15000"
replace B3B="42500" if B3B=="40000-45000"
replace B3B="40000" if B3B=="40000-50000"
replace B3B="750000" if B3B=="500,000-1000,0000"
replace B3B="10000" if B3B=="5000-15000"
replace B3B="50000" if B3B=="50000 more or less"
replace B3B="150000" if B3B=="50000-250000"
replace B3B="52500" if B3B=="50000-55000"
replace B3B="55000" if B3B=="50000-60000"
replace B3B="84500" if B3B=="59000-110000"
replace B3B="60000" if B3B=="60000 or more"
replace B3B="80000" if B3B=="60000-100000"
replace B3B="85000" if B3B=="60000-110000"
replace B3B="65000" if B3B=="60000-70000"
replace B3B="65000" if B3B=="65000 up"
replace B3B="70000" if B3B=="70000 or more or less"
replace B3B="85000" if B3B=="70000-100000"
replace B3B="75000" if B3B=="70000-80000"
replace B3B="26500" if B3B=="8000 45000"
replace B3B="80000" if B3B=="80000 up"
replace B3B="90000" if B3B=="80000-100000"
replace B3B="117500" if B3B=="85000-150000"
replace B3B="30000" if B3B=="less than 30000"
replace B3B="100000" if B3B=="over 100000 or less" | B3B=="under 100000"
replace B3B="0" if B3B=="just starting" | B3B=="none"
replace B3B="" if strpos(B3B,"remember")>0 | strpos(B3B,"cant")>0 | strpos(B3B,"dont")>0
replace B3B="" if strpos(B3B,"n/a")>0 | strpos(B3B,"sure")>0 | strpos(B3B,"refused")>0
replace B3B="1000000" if B3B=="1,000,000" | B3B=="1,000000 up"
replace B3B="250000" if strpos(B3B,"200000-300000")>0
replace B3B="3500000" if B3B=="3000000-4000000"
replace B3B="" if respondent_id==20760

* Correct costs in the last month
replace B4A=subinstr(B4A,",","",2)
replace B4A="60000" if B4A=="60"
replace B4A="11000" if B4A=="10000-12000"
replace B4A="11000" if B4A=="10000-12000"
replace B4A="12000" if B4A=="12000 up"
replace B4A="16500" if B4A=="15000-18000"
replace B4A="17500" if B4A=="15000-20000"
replace B4A="32500" if B4A=="30000-35000"
replace B4A="45000" if B4A=="40000-50000"
replace B4A="55000" if B4A=="50000-60000"
replace B4A="550000" if B4A=="500000-600000"
replace B4A="600000" if B4A=="600000 up"
replace B4A="8000" if B4A=="7000-9000"
replace B4A="85000" if B4A=="70000-100000"
replace B4A="90000" if B4A=="80000-100000"
replace B4A="11000" if B4A=="10000-12000"
replace B4A="0" if B4A=="no" | B4A=="none"
replace B4A="" if strpos(B4A,"remember")>0 | strpos(B4A,"cant")>0 | strpos(B4A,"dont")>0
replace B4A="" if strpos(B4A,"n/a")>0 | strpos(B4A,"sure")>0 | strpos(B4A,"refused")>0
replace B4A="5000" if respondent_id==20700

* Correct costs in a typical month
replace B4B="60000" if B4B=="60"
replace B4B=subinstr(B4B,",","",2)
replace B4B="10500" if B4B=="10000-11000"
replace B4B="10500" if B4B=="10000 up"
replace B4B="10500" if B4B=="150000up"
replace B4B="10500" if B4B=="12000 up"
replace B4B="11000" if B4B=="10000-12000"
replace B4B="12500" if B4B=="10000-15000"
replace B4B="16500" if B4B=="15000-18000"
replace B4B="17500" if B4B=="15000-20000"
replace B4B="22500" if B4B=="15000-30000"
replace B4B="155000" if B4B=="150000-160000"
replace B4B="175000" if B4B=="150000-200000"
replace B4B="20000" if strpos(B4B,"keep")>0
replace B4B="22500" if B4B=="20000-25000"
replace B4B="200000" if B4B=="200000 or more"
replace B4B="2000" if B4B=="2000up"
replace B4B="25000" if B4B=="25000 less or more"
replace B4B="29500" if B4B=="29000-30000"
replace B4B="32500" if B4B=="30000-35000"
replace B4B="35000" if B4B=="35000 up"
replace B4B="37500" if B4B=="35000-40000"
replace B4B="40000" if B4B=="35000-45000"
replace B4B="38000" if B4B=="38000 more or less"
replace B4B="45000" if B4B=="40000-50000"
replace B4B="47500" if B4B=="45000-50000"
replace B4B="5000" if B4B=="5000 or more"
replace B4B="55000" if B4B=="50000-60000"
replace B4B="6000" if B4B=="6000 or less"
replace B4B="8000" if B4B=="6000-10000"
replace B4B="7000" if B4B=="6000-8000"
replace B4B="60000" if B4B=="60000 or more"
replace B4B="67500" if B4B=="65000-70000"
replace B4B="7000" if B4B=="7000 or more"
replace B4B="7250" if B4B=="7000-75000"
replace B4B="8000" if B4B=="7000-9000"
replace B4B="70000" if B4B=="70000 or more"
replace B4B="85000" if B4B=="70000-100000"
replace B4B="75000" if B4B=="70000-80000"
replace B4B="82500" if B4B=="70000-95000"
replace B4B="37500" if B4B=="35000-45000"
replace B4B="90000" if B4B=="80000-100000"
replace B4B="125000" if B4B==" 100000-150000"
replace B4B="0" if B4B=="no" | B4B=="none"
replace B4B="" if strpos(B4B,"remember")>0 | strpos(B4B,"cant")>0 | strpos(B4B,"dont")>0
replace B4B="" if strpos(B4B,"n/a")>0 | strpos(B4B,"sure")>0 | strpos(B4B,"refused")>0
replace B4B="40000" if respondent_id==20458
replace B4B="125000" if respondent_id==20798

* Correct profits in the last month
replace B5A="0" if B5A==".0"
replace B5A="10000" if B5A==".10000"
replace B5A="12000" if B5A==".12000"
replace B5A="150000" if B5A==".150000"
replace B5A="180000" if B5A==".180000"
replace B5A="2000" if B5A==".2000"
replace B5A="200000" if B5A==".200000"
replace B5A="22000" if B5A==".22000"
replace B5A="6000" if B5A==".6000"
replace B5A="8000" if B5A==".8000"
replace B5A="87000" if B5A==".87000"
replace B5A="45000" if B5A=="45"
replace B5A=subinstr(B5A,",","",2)
replace B5A="" if B5A=="."
replace B5A="0" if B5A==".0"
replace B5A="-50000" if B5A=="-.50000"
replace B5A="10000" if B5A==".10000"
replace B5A="12000" if B5A==".12000"
replace B5A="150000" if B5A==".150000"
replace B5A="180000" if B5A==".180000"
replace B5A="2000" if B5A==".2000"
replace B5A="200000" if B5A==".200000"
replace B5A="22000" if B5A==".22000"
replace B5A="6000" if B5A==".6000"
replace B5A="8000" if B5A==".8000"
replace B5A="87000" if B5A==".87000"
replace B5A="10500" if B5A=="10000-11000"
replace B5A="90000" if B5A=="80000-100000"
replace B5A="0" if B5A=="break even"
replace B5A="" if strpos(B5A,"remember")>0 | strpos(B5A,"cant")>0 | strpos(B5A,"dont")>0
replace B5A="" if strpos(B5A,"n/a")>0 | strpos(B5A,"sure")>0 | strpos(B5A,"refused")>0
replace B5A="0" if B5A=="none"

* Correct profits in a typical month
replace B5B=subinstr(B5B,",","",2)
replace B5B="12000" if B5B==".12000"
replace B5B="27000" if B5B==".27000"
replace B5B="150000" if B5B==".150000"
replace B5B="200000" if B5B==".200000"
replace B5B="80000" if B5B==".80000"
replace B5B="45000" if B5B=="45"
replace B5B="" if B5B=="."
replace B5B="" if B5B=="0-350000"
replace B5B="1500000" if B5B=="1.500000"
replace B5B="10000" if B5B=="10000 or more"
replace B5B="10500" if B5B=="10000-11000"
replace B5B="11000" if B5B=="10000-12000"
replace B5B="30000" if B5B=="10000-50000"
replace B5B="100000" if B5B=="100000 up" 
replace B5B="12000" if B5B=="12000 or less"
replace B5B="13000" if B5B=="12000-14000"
replace B5B="155000" if B5B=="150000-160000"
replace B5B="15000" if B5B=="15000up"
replace B5B="20000" if B5B=="20000 0r more or less" | B5B=="20000 or more or less" | B5B=="20000 or less"
replace B5B="25000" if B5B=="20000-30000"
replace B5B="200000" if B5B=="200000 or more or less"
replace B5B="32000" if B5B=="32000up"
replace B5B="4000" if B5B=="3000-5000" 
replace B5B="45000" if B5B=="40000-50000" 
replace B5B="42000" if B5B=="42000 or less" 
replace B5B="4750" if B5B=="4500-5000" 
replace B5B="47000" if B5B=="47000 or less" 
replace B5B="7500" if B5B=="5000-10000" 
replace B5B="10000" if B5B=="5000-15000" 
replace B5B="50000" if B5B=="50000 or more" 
replace B5B="52500" if B5B=="50000-55000" 
replace B5B="8000" if B5B=="6000-10000" 
replace B5B="65000" if B5B=="60000-70000" 
replace B5B="8000" if B5B=="8000up"
replace B5B="90000" if B5B=="80000-100000" 
replace B5B="75000" if B5B=="100,00-50,000" 
replace B5B="1000000" if B5B=="1,000000 up" 
replace B5B="65000" if B5B=="60000-70000" 
replace B5B="75000" if B5B=="70000-80000" 
replace B5B="30000" if B5B=="less than 30000" 
replace B5B="17500" if B5B=="15000-20000"
replace B5B="0" if B5B=="break even" | B5B=="breaking even"
replace B5B="" if strpos(B5B,"remember")>0 | strpos(B5B,"cant")>0 | strpos(B5B,"dont")>0
replace B5B="" if strpos(B5B,"n/a")>0 | strpos(B5B,"sure")>0 | strpos(B5B,"refused")>0
replace B5B="0" if B5B=="none"

* Correct investment amount
replace B6_1=subinstr(B6_1,",","",2)
replace B6_1="1500000" if B6_1=="1.500000"
replace B6_1="1700000" if B6_1=="1.7000000" 
replace B6_1="1500000" if B6_1=="1.5m" 
replace B6_1="1000000" if B6_1=="1million" | B6_1=="over a million"
replace B6_1="3200000" if B6_1=="3.2mil"
replace B6_1="" if strpos(B6_1,"remember")>0 | strpos(B6_1,"process")>0 | strpos(B6_1,"sure")>0



*** Save dataset ***

* Drop unnecessary variables
drop SbjNum Filter SbjNam UsrUnq Upload SubjData RvwTime RvwComme SrvyrCom Complete StopQ Test ParentID Status UTCDiff NOMB_SUP D1 CON INTRO1 V_FINAL

* Save cleaned dataset
compress
save "$data_int/fu1_data_cleaned", replace


